Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Jun 9, 2025

Description

Make CI failures a bit more loud by publishing to Slack.


Important

Adds Slack notification for CI failures in code-qa.yml using a new slack-notify action.

  • New Action:
    • Adds slack-notify action in action.yml to send Slack notifications for workflow failures.
    • Parses failed-jobs JSON to identify failed jobs and formats them for Slack.
    • Uses 8398a7/action-slack@v3 to send notifications.
  • Workflow Changes:
    • Updates code-qa.yml to include notify-slack-on-failure job.
    • notify-slack-on-failure runs on main branch push if any job fails.
    • Uses slack-notify action to send failure details to Slack channel #ci.

This description was created by Ellipsis for c21119b. You can customize this summary. It will automatically update as commits are pushed.

@cte cte requested review from jr and mrubens as code owners June 9, 2025 19:45
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jun 9, 2025
@daniel-lxs daniel-lxs added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 9, 2025
- Add pull_request event to notify-slack-on-failure condition
- Previously only triggered on push events, missing PR failures
notify-slack-on-failure:
runs-on: ubuntu-latest
needs: [check-translations, knip, compile, platform-unit-test, integration-test]
if: ${{ always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/cte/slack-webhook') && (github.event_name == 'push' || github.event_name == 'pull_request') && contains(needs.*.result, 'failure') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When triggering on pull_request events, github.ref is usually a merge ref (e.g., refs/pull/123/merge) and won’t equal refs/heads/main or refs/heads/cte/slack-webhook. Consider using github.base_ref for PR events to ensure the branch check works as intended.

Suggested change
if: ${{ always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/cte/slack-webhook') && (github.event_name == 'push' || github.event_name == 'pull_request') && contains(needs.*.result, 'failure') }}
if: ${{ always() && ((github.event_name == 'pull_request' ? github.base_ref : github.ref) == 'refs/heads/main' || (github.event_name == 'pull_request' ? github.base_ref : github.ref) == 'refs/heads/cte/slack-webhook') && (github.event_name == 'push' || github.event_name == 'pull_request') && contains(needs.*.result, 'failure') }}

cte added 2 commits June 9, 2025 14:12
- Use github.head_ref for PR branch checking instead of github.ref
- github.ref in PRs refers to merge commit, not source branch
- Now properly checks source branch name for PR events
- Remove test file slack-webhook-test.spec.ts
- Simplify condition to only trigger on pushes to main branch
- Remove pull request condition as requested
@cte cte merged commit 174da08 into main Jun 9, 2025
8 checks passed
@cte cte deleted the cte/slack-webhook branch June 9, 2025 21:21
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 9, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants